<?php


namespace BigVideo\Other\Proxy;


class JuHeTimeCar implements MoveAble
{
    public function getClassName()
    {
        return "JuHeTimeCar";
    }

    private $car;

    public function __construct(MoveAble $carInstance)
    {
        $this->car = $carInstance;
    }

    public function move()
    {
        $stime = time();
        echo "车开始行使\n";
        $this->car->move();
        echo "车结束行使\n";
        $etime = time();
        echo "行使时间".($etime-$stime).'\\n';
    }
}